Component({
    properties: {
        popShow: {
            type: Boolean
        },
        reasonList: {
            value: [],
            type: Array
        }
    },
    data: {
        radio: 0,
        otherText: ""
    },
    methods: {
        setPopShow: function() {
            this.setData({
                popShow: !this.data.popShow
            });
        },
        onChange: function(t) {
            this.setData({
                radio: t.detail
            });
        },
        send: function() {
            var t = this.data.reasonList[this.data.radio];
            if (this.data.radio + 1 == this.data.reasonList.length && (t = this.data.otherText, 
            "" == this.data.otherText)) return app.tips("请输入其他原因");
            this.setPopShow(), this.triggerEvent("confirm", {
                text: t
            });
        }
    }
});